package com.example.fegin.controller;

import com.example.fegin.service.FeginClientService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author donniexue
 */
@RestController
@RequestMapping("/fegin")
@AllArgsConstructor
@Slf4j
public class FeginController {

    private final FeginClientService feginClientService;

    @GetMapping
    public String index(){

        log.info("this is fegin method");
        String services = feginClientService.getRegisterServices();

        log.info("eureka consume service result:" + services);
        return services;
    }

}
